<h1>用户列表</h1>
<table width="100%"   cellspacing="4" cellpadding="4" border="0" align="center" bgcolor="#f0f0f0">
<tbody>
<tr BGCOLOR=#FFCC33>
    <td>Name</td>
    <td>Email</td> 
    <td>Group</td> 
    <td>Time</td> 
    <td>Action</td> 
</tr>
  
<% for user in @users %>
  <tr>
    <td><%= link_to "#{user.display_name}",{:controller => "/admin/user", :action => "view",:id=>user.id},{:title=>user.personality}%></td>
    <td><%=user.email%></td>
    <td><%=user.user_group.title%></td>
    <td><%=user.created_at.to_s(:short)%></td>


    <td><%= link_to 'Show', :action => 'show', :id => user %>
    ,<%= link_to '编辑', :action => 'edit', :id => user %>
    ,<%= link_to '删除', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :post %></td>
 </tr>
<% end %>
</tbody>
</table>

<%= link_to 'Previous page', { :page => @user_pages.current.previous } if @user_pages.current.previous %>
<%= link_to 'Next page', { :page => @user_pages.current.next } if @user_pages.current.next %> 

<br />
<%= link_to 'New user', :action => 'new' %>


